﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using HsTec.DigitalPlatform.DataAccess;

namespace HsTec.DigitalPlatform.Business
{
    public class PlayerItemsInfoManager
    {
        PlayerItemsInfoRepository playeritemsinforepository = new PlayerItemsInfoRepository();

        public void Add(PlayerItemsInfo playeritemsinfo)
        {
            playeritemsinforepository.Add(playeritemsinfo);
        }

        public void Delete(PlayerItemsInfo playeritemsinfo)
        {
            playeritemsinforepository.Delete(playeritemsinfo);
        }

        public void Save()
        {
            playeritemsinforepository.Save();
        }

        public PlayerItemsInfo GetDeptInfoByID(int id)
        {
            return playeritemsinforepository.GetPlayerItemsInfoByID(id);
        }

        public IQueryable<PlayerItemsInfo> FindALLDeptInfo()
        {
            return playeritemsinforepository.FindALLPlayerItemsInfo();
        }

        public IQueryable<PlayerItemsInfo> PageInfo(int page, int rp, string sortname, string sortorder)
        {
            return playeritemsinforepository.PageInfo(page, rp, sortname, sortorder);
        }

        public int GetAllCount()
        {
            return playeritemsinforepository.GetAllCount();
        }

        public List<ViPlayerItmesInfo> GetItemsInfos(int playerid)
        {
            return playeritemsinforepository.GetItemsInfos(playerid);
        }

        public void DeleteByPlayer(int playerid)
        {
            playeritemsinforepository.DeleteByPlayer(playerid);
        }
    }
}
